<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/static/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<style type="text/css">
	.info{color:#666;font-size:10px;}
</style>
<title>添加/修改 - 预约设置 - H-ui.admin v3.1</title>
<meta name="keywords" content="H-ui.admin v3.1,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
<meta name="description" content="H-ui.admin v3.1，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>系统设置<span class="c-gray en">&gt;</span> 表单预约 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<article class="page-container">
	<form class="form form-horizontal" id="form-admin-add">
		<input type="hidden" class="input-text" value="{$v.id}" id="id" name="id">
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">状态：</label>
			<div class="formControls col-xs-4 col-sm-5">
               <label class="radio-inline">
                   <input type="radio" id="emailwy1" name="index_show" value="1" {if $v['index_show']==1}checked{/if} />
                   <label for="emailwy1">启用</label>
               </label>
               <label class="radio-inline">
                   <input type="radio" id="emailwy2" name="index_show" value="2" {if $v['index_show']==2 || $v['index_show']==0 || empty($v['index_show'])}checked{/if} /><label for="emailwy2">禁用</label>
               </label>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">表单上方标题：</label>
			<div class="formControls col-xs-4 col-sm-5">
				<input type="text" class="input-text" value="{$v.form_title}" placeholder="表单上方标题" id="form_title" name="form_title">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">表单上方图片：</label>
			<div class="formControls col-xs-8 col-sm-9">
                <div style="position:relative;" id="drop_area"></div>
                <p style="color:#ccc;font-size:12px;">建议尺寸宽高:2:1</p>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">表单上方的说明文字：</label>
			<div class="formControls col-xs-4 col-sm-5">
				<input type="text" class="input-text" value="{$v.form_intro}" placeholder="表单上方的说明文字" id="form_intro" name="form_intro">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">表单提交时间间隔：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="number" class="input-text" value="{$v.form_time}" placeholder="表单提交时间间隔" id="form_time" name="form_time">
				<p style="color:#ccc;font-size:10px;">为防止恶意重复提交，这里设置同一个客户两次提交数据的间隔时间，单位是分钟。如不需要此功能，填写0即可</p>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">一行的文本框：</label>
			<div class="formControls col-xs-4 col-sm-5">
				<input type="text" class="input-text" value="{$v.txtconfig[0]['title']}" placeholder="这里填写文本框标题，如姓名" id="t1name" name="t1name">
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t1show" {if $v.txtconfig[0]['show']} checked="checked" {/if}> 
			  <label class="info">是否使用</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t1full" {if $v.txtconfig[0]['isnull']} checked="checked" {/if}> 
			  <label class="info">是否必填</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t1email" {if $v.txtconfig[0]['email']} checked="checked" {/if}> 
			  <label class="info">是否email</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t1phone" {if $v.txtconfig[0]['phone']} checked="checked" {/if}> 
			  <label class="info">是否phone</label>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">一行的文本框：</label>
			<div class="formControls col-xs-4 col-sm-5">
				<input type="text" class="input-text" value="{$v.txtconfig[1]['title']}" placeholder="这里填写文本框标题，如电话" id="t2name" name="t2name">
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t2show" {if $v.txtconfig[1]['show']} checked="checked" {/if}> 
			  <label class="info">是否使用</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t2full" {if $v.txtconfig[1]['isnull']} checked="checked" {/if}> 
			  <label class="info">是否必填</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t2email" {if $v.txtconfig[1]['email']} checked="checked" {/if}> 
			  <label class="info">是否email</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t2phone" {if $v.txtconfig[1]['phone']} checked="checked" {/if}> 
			  <label class="info">是否phone</label>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">一行的文本框：</label>
			<div class="formControls col-xs-4 col-sm-5">
				<input type="text" class="input-text" value="{$v.txtconfig[2]['title']}" placeholder="这里填写文本框标题，如email" id="t3name" name="t3name">
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t3show" {if $v.txtconfig[2]['show']} checked="checked" {/if}> 
			  <label class="info">是否使用</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t3full" {if $v.txtconfig[2]['isnull']} checked="checked" {/if}> 
			  <label class="info">是否必填</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t3email" {if $v.txtconfig[2]['email']} checked="checked" {/if}> 
			  <label class="info">是否email</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t3phone" {if $v.txtconfig[2]['phone']} checked="checked" {/if}> 
			  <label class="info">是否phone</label>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">一行的文本框：</label>
			<div class="formControls col-xs-4 col-sm-5">
				<input type="text" class="input-text" value="{$v.txtconfig[3]['title']}" placeholder="这里填写文本框标题，如地址" id="t4name" name="t4name">
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t4show" {if $v.txtconfig[3]['show']} checked="checked" {/if}> 
			  <label class="info">是否使用</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t4full" {if $v.txtconfig[3]['isnull']} checked="checked" {/if}> 
			  <label class="info">是否必填</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t4email" {if $v.txtconfig[3]['email']} checked="checked" {/if}> 
			  <label class="info">是否email</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="t4phone" {if $v.txtconfig[3]['phone']} checked="checked" {/if}> 
			  <label class="info">是否phone</label>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">多行的文本框：</label>
			<div class="formControls col-xs-4 col-sm-5">
				<input type="text" class="input-text" value="{$v.taconfig['title']}" placeholder="这里填写多行文本框标题" id="aname" name="aname">
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="ashow" {if $v.taconfig['show']} checked="checked" {/if}> 
			  <label class="info">是否使用</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="afull" {if $v.taconfig['isnull']} checked="checked" {/if}> 
			  <label class="info">是否必填</label>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">单选框：</label>
			<div class="formControls col-xs-4 col-sm-5">
				<input type="text" class="input-text" value="{$v.iaconfig['title']}" placeholder="这里填写单选框标题" id="rname" name="rname">
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="rshow" {if $v.iaconfig['show']} checked="checked" {/if}> 
			  <label class="info">是否使用</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="rfull" {if $v.iaconfig['isnull']} checked="checked" {/if}> 
			  <label class="info">是否必填</label>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">单选框的值：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="{$v.iaconfig['value']}" placeholder="每个值用英文逗号隔开，例如：高中,本科,硕士" id="rvalue" name="rvalue">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">复选框：</label>
			<div class="formControls col-xs-4 col-sm-5">
				<input type="text" class="input-text" value="{$v.iaconfig['title']}" placeholder="这里填写单选框标题" id="cname" name="cname">
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="cshow" {if $v.iaconfig['show']} checked="checked" {/if}> 
			  <label class="info">是否使用</label>
			</div>
			<div class=" col-xs-1 col-sm-1">
			  <input type="checkbox" class="form-control"  name="cfull" {if $v.iaconfig['isnull']} checked="checked" {/if}> 
			  <label class="info">是否必填</label>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">复选框的值：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="{$v.icconfig['value']}" placeholder="每个值用英文逗号隔开，例如：高中,本科,硕士" id="cvalue" name="cvalue">
			</div>
		</div>
    	<div class="col-sm-12" style="margin:10px auto;"><hr></div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2"></label>
			<div class="formControls col-xs-8 col-sm-9">
				<h5 style="color:red;">开启QQ邮箱通知自己</h5>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">状态：</label>
			<div class="formControls col-xs-4 col-sm-5">
               <label class="radio-inline">
                   <input type="radio" id="emailwy1" name="email_state" value="1" {if $v['email_state']==1}checked{/if} />
                   <label for="emailwy1">启用</label>
               </label>
               <label class="radio-inline">
                   <input type="radio" id="emailwy2" name="email_state" value="2" {if $v['email_state']==2 || $v['email_state']==0 || empty($v['email_state'])}checked{/if} />
                   <label for="emailwy2">禁用</label>
               </label>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">自己的QQ邮箱：</label>
			<div class="formControls col-xs-4 col-sm-5">
				<input type="email" class="input-text" value="{$v.email_self}" placeholder="QQ邮箱" id="email_self" name="email_self">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">授权码：</label>
			<div class="formControls col-xs-4 col-sm-5">
				<input type="text" class="input-text" value="{$v.email_code}" placeholder="授权码" id="email_code" name="email_code">
				<a target="blank" style="color:#5a98de;font-size:10px;" href="https://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256">授权说明：https://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256</a>
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-3 col-sm-offset-2">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</article>

<!--_footer 作为公共模版分离出去--> 
<script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="/static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/messages_zh.js"></script> 
<script type="text/javascript" src="/static/js/upload.js"></script>
<script type="text/javascript">
var imgpz;
$(function(){
	$('#drop_area div img').attr('src','{$v.form_img}');
	$('#drop_area div img').attr('onerror',"javascript:this.src='/static/img/upload.png'");
	if($("#drop_area div img").attr('src')=='/static/img/upload.png'){
		imgpz='';
	}else{
		imgpz= $("#drop_area div img").attr('src');
	}
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	$("#form-admin-add").validate({
		rules:{},
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			$(form).ajaxSubmit({
				type: 'post',
				url: "{:url('table_set')}",
				data:{form_img:imgpz},
				success: function(data){
					if(data.code==200){
						layer.msg('成功！',{icon:1,time:3000});
					}else{
						layer.msg(data.msg,{icon:2,time:3000});
					}

				},
                error: function(XmlHttpRequest, textStatus, errorThrown){
						layer.msg('失败！',{icon:2,time:3000});
				}
			});
		}
	});
});
var dragImgUpload = new DragImgUpload("#drop_area",{
    callback:function (files) {
        //回调函数，可以传递给后台等等
        if(files[0].size<3145728){
	        var file = files[0];
	        var formData = new FormData();
	        formData.append("file",file);
	        $.ajax({
	              type: 'POST',
	              url: "{:url('qiniuupload')}",
	              data:formData,
	              contentType: false, /*不可缺*/
	              processData: false, /*不可缺*/
	              success: function(response){
	                if(response.code==200){
	                  imgpz=response.data
	                }else{
	                  alert(response.msg);
	                }
	              },
	              error: function(err){

	              }
	        })
        }else{
        	alert('出错');
        	location.replace(location.href);
        }
    }
})
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>